from lagou_cekai.task3_3appium2.ten_class_Enterprise_wechat.page.base_page import BasePage33
from lagou_cekai.task3_3appium2.ten_class_Enterprise_wechat.page.page_element.el_contact_page import tongxunlu
from lagou_cekai.task3_3appium2.ten_class_Enterprise_wechat.page.page_function.fun_addmember_page import AddMember33


class ContextPage33(BasePage33):
    def click_addmember(self):
        self.find_click(tongxunlu,'通讯录','添加成员')
        return AddMember33(self.driver)

    def click_list_member(self,list_num):
        """
        :param num:  目前只能填数字1-3,列表是第几个成员
        :return:
        """
        self.find_click(tongxunlu,'企业通讯录列表',f'列表成员{list_num}')
        from lagou_cekai.task3_3appium2.ten_class_Enterprise_wechat.page.page_function.fun_gerenxinxi_page import \
            GeRenXinXi
        return GeRenXinXi(self.driver)

    def find_list_member_name(self,list_num):
        return self.find_get_text(tongxunlu,'企业通讯录列表姓名',f'列表成员{list_num}姓名')
